function Images()
{
	me = this;
	var logoRequest_ = new XMLHttpRequest();
	var number_of_results = -1;
	var ASIN;
	var num = 0;
	
	this.getResults = function() {
		return number_of_results;
	}
	
	this.fetch_art = function(artist, title, number) {
		if (artist == undefined) {return;}
		if (title == undefined) {return;}
		num = number;
		var artist_ = artist.replace(/ /g,"+");
		artist_ = artist_.replace(/[\n\r\t]/g,"");
		var title_ = title.replace(/ /g,"+");
		title_ = title_.replace(/[\n\r\t]/g,"");
		var URL = 
		"http://ecs.amazonaws.com/onca/xml?Service=AWSECommerceService&Version=2005-03-23&Operation=ItemSearch&ContentType=text%2Fxml&SubscriptionId=0H3CPPFTKSS7DT7ZPQ82&SearchIndex=Music&Artist=" + artist_ + "&Title=" + title_ + "&ResponseGroup=Images";
		try {
		  logoRequest_.open("GET", URL, true);
		} catch (e) {
		  return;
		}

		logoRequest_.onreadystatechange = function(){ me.incoming()};

		try {
		  logoRequest_.send();
		} catch (e) {
			alert("bad things");
		  return;
		}
	}

	this.incoming = function() {
		if (logoRequest_.readyState != 4) { return; }
		if (logoRequest_.status != 200) {
			alert("State is not 200... this is bad.");
			return;
		}
		var xmldoc = logoRequest_.responseXML;
		var root = xmldoc.getElementsByTagName("ItemSearchResponse")[0];
		var items = root.childNodes.item(1);
		var TotalResults = items.childNodes.item(1);
		number_of_results = TotalResults.text;
		if (number_of_results > 0) {
			var s = parseInt(options.getValue("size")) + 1;
			var t = 3 + num;
			var Item = items.childNodes.item(t);
			ASIN = Item.childNodes.item(0);
			var LargeImage = Item.childNodes.item(s);
			URL = LargeImage.childNodes.item(0).text;
		} else {
			album_image.src = "stock_images\\no_album.png";
			var w = album_image.srcWidth;
			var h = album_image.srcHeight;
			view.resizeTo(w,h);
			return;
		}
		try {
		  logoRequest_.open("GET", URL, true);
		} catch (e) {
		  return;
		}

		logoRequest_.onreadystatechange = function(){ me.display()};

		try {
		  logoRequest_.send();
		} catch (e) {
			alert("bad things");
		  return;
		}
	}
	
	this.display = function() {
		if (logoRequest_.readyState != 4)
	    return;

	  if (logoRequest_.status != 200) {
	    return;
	  }
	  album_image.src = logoRequest_.responseStream;
		var w = album_image.srcWidth;
		var h = album_image.srcHeight;
		view.resizeTo(w,h);
	}
}